home *** CD-ROM | disk | FTP | other *** search
/ Champak 135 / Vol 135.iso / games / bunny_gr.swf / scripts / frame_66 / DoAction.as
Text File  |  2008-11-12  |  925b  |  33 lines

  1. level_time = MAX_WAIT - (MAX_WAIT / MAX_LEVEL * level - "1") + MIN_WAIT;
  2. k = "1";
  3. while(eval("/:MAX_HOLES") >= k)
  4. {
  5.    if(eval("/:hole" add k) == "1")
  6.    {
  7.       time_elapsed = getTimer() - eval("/hole" add k add ":start_time");
  8.       percentage = time_elapsed / eval("/:level_time");
  9.       if("1" >= percentage)
  10.       {
  11.          tellTarget("hole" add k)
  12.          {
  13.             set("/:start",eval("/:START" add current_drink));
  14.             gotoAndStop(int(eval("/:start") + eval("/:DRINK_LENGTH") * eval("/:percentage")));
  15.          }
  16.       }
  17.       else
  18.       {
  19.          set("/:drinks_active",eval("/:drinks_active") - "1");
  20.          set("/:hole" add k,"0");
  21.          tellTarget("hole" add k)
  22.          {
  23.             gotoAndStop(1);
  24.             if(current_drink == eval("/:LIFE_DRINK"))
  25.             {
  26.                set("/:life_active","0");
  27.             }
  28.          }
  29.       }
  30.    }
  31.    k += "1";
  32. }
  33.